#-*- coding:utf-8 -*-

'''
Created on 08.Nis.2010

@author: Metehan
'''

from PyQt4.QtGui import *
from PyQt4.QtCore import *
import sys, time, threading


class Thread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
        
    def run(self):
        for i in range(10):
            sys.stdout.write(str(i)+"\r")
            sys.stdout.flush()
            time.sleep(0.2)
        self.__stop()

class QButton(QPushButton):
    def __init__(self, parent):
        QPushButton.__init__(self, parent)
        
        #self.emit("hede()",self.yap)
        pass
    
    def mouseReleaseEvent(self, event):
        self.setDown(False)
        print "das"
        thread = Thread()
        thread.start()
            #QApplication.processEvents()
        #self.setDown(False)
    
    def yap(self):
        pass

